home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / CalcIt / ! CalcIt ReadMe next >
Encoding:
Text File  |  1993-08-25  |  1.4 KB  |  51 lines  |  [TEXT/MPS ]

  1. CalcIt is an unfinished sample application starting with AppWannabe.
  2. The purpose of this sample is to demonstrate how close AppWannabe is
  3. to being another application.  There is only one code change to
  4. AppWannabe, and that change is actually optional.  All other changes
  5. consist of resource changes and changes made to the 'WFMT' resource
  6. using the AppsToGo application editor.
  7.  
  8. To build CalcIt, do the following:
  9.  
  10. 1)    Copy the following files from the AppWannabe project folder:
  11.         App.defs.h
  12.         App.h
  13.         App.protos.h
  14.         AppWannabe.π
  15.         DoEvent.c
  16.         EventLoop.c
  17.         File.c
  18.         IdleTasks.c
  19.         Menu.c
  20.         OBJECT
  21.         Start.c
  22.         TRootObj.c
  23.         Window.c
  24.         WindowDialog.c
  25.         WindowPalette.c
  26.  
  27. 2)    Rename AppWannabe.π to CalcIt.π.
  28.  
  29. 3)    The below code change allows CalcIt to quit when the calculator
  30.     window is closed.  This allows CalcIt to behave like a DA instead
  31.     of an Application.  Replace the current WindowGoneFixup function
  32.     (which is found in the file Window.c) with the below:
  33.  
  34. extern Boolean    gQuitApplication;
  35. #pragma segment TheDoc
  36. void    WindowGoneFixup(WindowPtr window)
  37. {
  38. #pragma unused (window)
  39.  
  40.     gQuitApplication = true;
  41. }
  42.  
  43. 4)    Build the project.  For THINK, save the application as CalcIt.
  44.  
  45.  
  46. Of course, this isn't a finished application, as it doesn't calculate.
  47. The point of this sample is to show what you can (and can't) do with
  48. no code changes.  All that remains to complete this application is a
  49. little code to handle the math.  The human interface is complete, though.
  50.  
  51.